#include <iostream>
using namespace std;

int main()
{
    //1、整型
    int a = 0;
    cout << "请给整型变量a赋值：" ;
    cin >> a;
    cout << "整型变量 a = " << a << endl;

    //2、浮点型
    float f = 3.14f;
    cout << "请给浮点型变量f赋值：" ;
    cin >> f;
    cout << "浮点型变量 f = " << f << endl;

    //3、字符型
    char ch = 'a';
    cout << "请给字符变量ch赋值：" ;
    cin >> ch;
    cout << "字符型变量ch = " << ch << endl;

    //4、字符串型
    string str = "hello";
    cout << "请给字符串str赋值：" ;
    cin >> str;
    cout << "字符串str = " << str << endl;

    //5、布尔类型
    bool flag = false;
    cout << "请给布尔类型flag赋值：";
    cin >> flag; // 只要是非0，就代表真
    cout << "布尔类型变量flag = " << flag << endl; // flag为 0或1

    return 0;
}